package com.hushow.bus.demo;

import com.alibaba.fastjson.JSON;
import com.hushow.bus.demo.event.RouteRemoteApplicationEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.trace.http.HttpTraceRepository;
import org.springframework.boot.actuate.trace.http.InMemoryHttpTraceRepository;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.bus.event.AckRemoteApplicationEvent;
import org.springframework.cloud.bus.event.SentApplicationEvent;
import org.springframework.cloud.bus.jackson.RemoteApplicationEventScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.event.EventListener;

import java.util.LinkedHashMap;
import java.util.Map;

@Slf4j
@SpringBootApplication(scanBasePackages = {"com.hushow.bus.demo.**"})
public class PublishApplication {
	public static void main(String[] args) {
		SpringApplication.run(PublishApplication.class, args);
	}

	@Bean
	public HttpTraceRepository traceRepository() {
		return new InMemoryHttpTraceRepository();
	}
}
